//
//  UIButton-Extension.swift
//  WeiBo
//
//  Created by iris on 16/3/14.
//  Copyright © 2016年 陈真真. All rights reserved.
//

import UIKit

extension UIButton {
    convenience init(imageName : String,bgImageName : String) {
        self.init()
        setImage(UIImage(named: imageName), forState: .Normal)
        setImage(UIImage(named: imageName + "_highlighted"), forState: .Highlighted)
        setBackgroundImage(UIImage(named: bgImageName), forState: .Normal)
        setBackgroundImage(UIImage(named: bgImageName + "_highlighted"), forState: .Highlighted)
        sizeToFit()
    }
}
